<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>首页</title>
        <script src="../static/jquery.js"></script>
    </head>
    <body>
        <input type="button" value="获取信息" onclick="getMsg()" />
        <input type="button" value="删除信息" onclick="delMsg()" />
    </body>
    <script>
        function getMsg(){
            $.ajax({url:"http://localhost:8080/getMsg",type:"get",success(msg) {
                    alert(msg);
                }
            })
        }
        function delMsg(){
            $.ajax({url:"http://localhost:8080/delMsg",type:"get",success(msg) {
                    alert(msg);
                }
            })
        }
    </script>
</html>